<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>游戏信息列表</h2>
        <ol class="breadcrumb">
            <li>
                <a href="#">首页</a>
            </li>

            <li class="active">
                <strong>游戏信息列表</strong>
            </li>
        </ol>
    </div>

</div>

<div class="wrapper wrapper-content animated fadeInRight ecommerce">

    <div class="ibox-content m-b-sm border-bottom" id="form1">
        <div class="row">
                        <div class="col-sm-3">
                <div class="form-group">
                    <label class="control-label" for="game_name">游戏名称</label>
                                        <input type="text" id="game_name" name="game_name" placeholder="游戏名称"
                           class="form-control">
                                    </div>
            </div>









                    </div>
        <div class="row">
            <div class="col-sm-6">
                <a class="btn btn-success btn-outline" href="#{:U('form')}">
                    <i class="fa fa-edit"></i>
                    <span class="bold">添加</span>
                </a>
            </div>
            <div class="col-sm-6 text-right">
                <button class="btn btn-default" data-op="reset">
                    <i class="fa fa-refresh"></i>
                    <span class="bold">重置</span>
                </button>
                &nbsp;
                &nbsp;
                <button class="btn btn-primary" data-op="search">
                    <i class="fa fa-search"></i>
                    <span class="bold">查询</span>
                </button>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" id="footable">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(document).ready(function () {
        var table = YFootTable.create('#footable', {
            baseUrl: "{:U('GameInfo/')}",
            searchForm: '#form1',
            columns: [
                {name:'game_name',title:'游戏名称',sortable: true}
				,{name:'game_brief',title:'游戏简介',sortable: true,breakpoints:'xs sm md'}
				,{name:'providename',title:'公司名称',sortable: true,breakpoints:'xs sm md'}
				,{name:'download_times',title:'下载次数',sortable: true,breakpoints:'xs sm md'}
				,{name:'size',title:'大小',sortable: true,breakpoints:'xs sm md'}

				,{name:'imageico',title:'图标',sortable: true,breakpoints:'xs sm md'}
				,{name:'auth__status',title:'审核状态',sortable: true,breakpoints:'xs sm md'}

            ],
            actions: [{
                text:'审核',
                token:'auth',
                handler:function(row){
                    if(row.status == 1){
                        YMessager.alert('已审核');
                        return;
                    }
                    YMessager.confirm('是否确定审核',function () {

                    c.post("{:U('authGame')}",{id:row.id,status:1},function () {
                       table.loadData();
                    });
                });
                }
            },{
                text:'拒绝',
                token:'auth',
                handler:function(row){
                    if(row.status == 2){
                        YMessager.alert('已拒绝');
                        return;
                    }
                    YMessager.confirm('是否确定拒绝',function () {

                        c.post("{:U('authGame')}",{id:row.id,status:2},function () {
                            table.loadData();
                        });
                    });

                }
            },'edit','view',  'remove']
        });
    });
</script>